from django.contrib.auth.models import User
from django.db import models


# Create your models here.

class UserProfile(models.Model):
    """UserProfile"""

    user = models.OneToOneField(User, on_delete=models.CASCADE)

    age = models.IntegerField(default=1, blank=True)
    phone = models.CharField(max_length=16, default='', blank=True)
    desc = models.CharField(max_length=300, default="", blank=True)

    icon = models.FileField(upload_to='photos/', default='photos/avtar.png')

    # Account
    verify_code = models.CharField(max_length=128, default='', blank=True, null=True)

    def __unicode__(self):
        return str(self.user)
